home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #1 / Amiga Plus CD - 2000 - No. 1.iso / Tools / Text / Edit / GoldED-Demo / installdata / golded / developer / api / examples / info / defs.h next >
Encoding:
C/C++ Source or Header  |  1999-12-03  |  2.6 KB  |  86 lines

  1. #include <ctype.h>
  2. #include <string.h>
  3. #include <exec/types.h>
  4. #include <exec/ports.h>
  5. #include <exec/memory.h>
  6. #include <exec/semaphores.h>
  7. #include <exec/libraries.h>
  8. #include <dos/dos.h>
  9. #include <dos/rdargs.h>
  10. #include <intuition/intuitionbase.h>
  11.  
  12. #include <clib/exec_protos.h>
  13. #include <clib/alib_protos.h>
  14. #include <clib/dos_protos.h>
  15. #include <clib/diskfont_protos.h>
  16. #include <clib/graphics_protos.h>
  17. #include <clib/intuition_protos.h>
  18.  
  19. #define LibCall    __geta4 __regargs
  20. #define Prototype  extern
  21.  
  22. #include "golded:developer/api/include/apilib.h"
  23. #include "golded:developer/include/editor.h"
  24.  
  25. /* prototypes */
  26.  
  27. #include "o/lib-protos.h"
  28.  
  29. /* private defines */
  30.  
  31. #define MAX_PATHLEN 512
  32.  
  33. /* dictionary root */
  34.  
  35. struct Dictionary {
  36.  
  37.     struct Node                Node;                 /* it's a linked list */
  38.     UBYTE                      File[MAX_PATHLEN];    /* dictionary file */
  39.     UBYTE                     *Data;                 /* dictionary data */
  40.     struct List                Entries;              /* dictionary entries */
  41.     struct Template           *Hash[2704];           /* simple hash index (52*52 slots) */
  42. };
  43.  
  44. /* dictionary entry */
  45.  
  46. struct Template {
  47.  
  48.     struct Node                Node;                 /* it's a linked list */
  49.     UWORD                      Len;                  /* keyword length */
  50.     UBYTE                     *Keyword;              /* keyword string */
  51.     UBYTE                     *Info;                 /* help text */
  52. };
  53.  
  54. /* we allocate a PlugInContext for each plug-in instance */
  55.  
  56. struct PlugInContext {
  57.  
  58.     struct APIClient           APIClient;            /* API handle (exposed to host) */
  59.     struct APIArea             APIArea;              /* area request */
  60.     struct Dictionary         *Dictionary;           /* dictionary root */
  61.     BOOL                       Attached;             /* attached to a container ? */
  62.     UBYTE                     *Text;                 /* text in display */
  63.     BOOL                       Status;               /* use status line for messages ? */
  64.     BOOL                       Ignorecase;           /* case sensitive ? */
  65. };
  66.  
  67. /* globals */
  68.  
  69. extern const char              LibName[];
  70. extern const char              LibId[];
  71.  
  72. extern struct SignalSemaphore  QuickInfoSemaphore;   /* used to serialize functions */
  73. extern struct List             DictionaryList;       /* root of dictionaries */
  74.  
  75. /* libraries */
  76.  
  77. extern struct Library         *IntuitionBase;
  78. extern struct Library         *DiskfontBase;
  79. extern struct Library         *SysBase;
  80. extern struct GfxBase         *GfxBase;
  81.  
  82. /* arrays */
  83.  
  84. extern BOOL                    IsSPC     [256];
  85. extern BOOL                    IsBOUNDARY[256];
  86.